package com.yusheng.tr.multi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yusheng.tr.common.core.entity.multi.TransDistEntity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 运输距离表 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2023-09-27
 */
public interface TransDistMapper extends BaseMapper<TransDistEntity> {

    /**
     * 查询运输距离列表数据
     * @param params
     */
    @Select("SELECT * FROM trans_dist")
    List<TransDistEntity> queryTransDistList(TransDistEntity params);


    /**
     * 删除接口
     */

    @Delete("delete from trans_dist where id = #{id}")
    void deleteByUserId(String id);

    /**
     * 更新接口
     */


    /**
     * 对开始区域，到达区域进行去重
     */
//    @Select("select distinct start_area from trans_dist")
//    List<String> distinctArea(String startarea);

    @Select("select distinct start_area from trans_dist")
   List<String> selcet(String startarea);

    @Select("SELECT DISTINCT start_area FROM trans_dist")
    List<String> selectDistinctStartArea();


    @Select("SELECT DISTINCT end_area FROM trans_dist")
    List<String> selectDistinctEndArea();

}
